<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link rel="stylesheet" href="http://www.petercorke.com/RVC/common/toolboxhelp.css">
    <title>M-File Help: bresenham</title>
  </head>
  <body>
  <table border="0" cellspacing="0" width="100%">
    <tr class="subheader">
      <td class="headertitle">M-File Help: bresenham</td>
      <td class="subheader-left"><a href="matlab:open bresenham">View code for bresenham</a></td>
    </tr>
  </table>
<h1>bresenham</h1><p><span class="helptopic">Generate a line</span></p><strong>p</strong> = <span style="color:red>bresenham</span>(<strong>x1</strong>, <strong>y1</strong>, <strong>x2</strong>, <strong>y2</strong>) is a list of integer coordinates for
points lying on the line segement (<strong>x1</strong>,<strong>y1</strong>) to (<strong>x2</strong>,<strong>y2</strong>).  Endpoints
must be integer.

<strong>p</strong> = <span style="color:red>bresenham</span>(<strong>p1</strong>, <strong>p2</strong>) as above but <strong>p1</strong>=[<strong>x1</strong>,<strong>y1</strong>] and <strong>p2</strong>=[<strong>x2</strong>,<strong>y2</strong>].

<h2>See also</h2>
<p>
<a href="matlab:doc icanvas">icanvas</a></p>
<hr>

<table border="0" width="100%" cellpadding="0" cellspacing="0">
  <tr class="subheader" valign="top"><td>&nbsp;</td></tr></table>
<p class="copy">&copy; 1990-2011 Peter Corke.</p>
</body></html>